home *** CD-ROM | disk | FTP | other *** search
- Path: newsfeed.internetmci.com!xmission!news
- From: tknarr@xmission.com ( Todd Knarr )
- Newsgroups: comp.lang.c++
- Subject: Re: deque container - how to implement?
- Date: 13 Jan 1996 17:05:51 GMT
- Organization: Chaos Central
- Message-ID: <4d8opf$8hg@news.xmission.com>
- References: <4d4c73$qmr@news.xmission.com> <4d71oi$gig@rap.SanDiegoCA.ATTGIS.COM>
- Reply-To: tknarr@xmission.com ( Todd Knarr )
- NNTP-Posting-Host: slc61.xmission.com
- X-Newsreader: IBM NewsReader/2 v1.2
-
- >The implementation of a deque uses arrays to provide constant-time
- >access, but adds one level of indirection to gain the storage flexibility
- >that allows inserts at either end (but not in the middle) to execute
- >in constant time.
-
- I'll have to pull out the STL source and look at it again, but I thought
- the first time I looked at it that you could still invoke an array copy
- during an at-end insert when there was no more room in the pointer array.
- I can't see any way of avoiding that without going to some sort of a linked
- representation, which loses constant-time access.
-
- --
- Todd Knarr : tknarr@xmission.com | finger for PGP public key
- | Member, USENET Cabal
-
- Seriously, I don't want to die just yet. I don't care how
- good-looking they are, I! don't! want! to! die!"
- -- Megazone ( UF1 )
-
-